package cn.itcast.controller;

import cn.itcast.service.CountyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CountyController {
    @Autowired
    private CountyService countyService;

    @RequestMapping("/findCounty")
    @ResponseBody
    public Object findCounty(String key) throws Exception {
        System.out.println(key);
        return countyService.findCity(key);
    }

}
